<?php


header('Content-Type: text/html; charset=utf-8');

include_once 'cfg/def.php';
include_once 'cfg/vk.auth.php';
include_once 'lib/utils.class.php';
include_once 'model/dblog.class.php';
include_once 'view/page.class.php';
include_once 'view/page_add.class.php';
// include_once 'view/v_k2test.php';

mDBLog::Fix();

if(!$auth_ok)
{
	echo "access denied";
	exit();
}	

$page_type = Utils::get_param('page', 'add');
$page = null;

switch ($page_type)
{
	case 'add':
		$page = new AddPage($viewer);
		break;
		
	case 'get':
		break;
}

echo $page->out();

exit();

foreach ($_SERVER as $key => $val)
	echo "$key=$val<br/>";
